import React from 'react';
import { ExportC, SecondHeaderC, FirstHeaderC } from '../../components';

class ExportCDemo extends React.Component {
  state = {
    search: { date: '2023-07-13', isSplit: true, positionDimension: 'merge', productIds: '', tradingCodes: '' },
    url: 'gateway/risk-holding/risk/holding/web/positionInfo/export',
    title: '穿透持仓查询数据导出',
  };

  render() {
    return (
      <div style={{ padding: '20px' }}>
        <FirstHeaderC title='文件导出' />

        <SecondHeaderC title='正常导出' />
        <div style={{ marginBottom: '10px' }}>
          <ExportC url={this.state.url} search={this.state.search} />
        </div>

        <SecondHeaderC title='禁用状态' />
        <div style={{ marginBottom: '10px' }}>
          <ExportC url={this.state.url} search={this.state.search} disabled={true} />
        </div>

        <SecondHeaderC title='更换标题' />
        <div style={{ marginBottom: '10px' }}>
          <ExportC url={this.state.url} search={this.state.search} title={this.state.title} />
        </div>
        <SecondHeaderC title='自定义样式' />
        <div style={{ marginBottom: '10px' }}>
          <ExportC url={this.state.url} search={this.state.search} style={{ padding: 40, background: 'pink' }} />
        </div>
      </div>
    );
  }
}

export default ExportCDemo;
